/*
*
* Copyright (C) 2004 - 2008 BitLaboratory (see http://www.bitlaboratory.com)
* All rights reserved. 
*
* Redistribution and use in source and binary forms, with or without modification, 
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
*    this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
*    this list of conditions and the following disclaimer in the documentation
*    and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
*    derived from this software without specific prior written permission. 
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
* OF SUCH DAMAGE.
*
* You can find the latest version of this library at http://www.bitlaboratory.com
*
*/


using System;
using System.Runtime.InteropServices;

namespace BitLaboratory.Win32Api.CommonControls
{
	/// <summary>
	/// 
	/// </summary>
	[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
	public struct TreeViewMessages 
	{
		public static int TVM_EDITLABEL;
		public static int TVM_SETITEM;
		public static int TVM_GETITEM;

		public const int TV_FIRST                = 0x1100;
		public const int TVM_SELECTITEM          = ((int)TV_FIRST + 11);
		public const int TVM_GETITEMA            = ((int)TV_FIRST + 12);
		public const int TVM_GETITEMW            = ((int)TV_FIRST + 62);
		public const int TVM_SETITEMA            = ((int)TV_FIRST + 13);
		public const int TVM_SETITEMW            = ((int)TV_FIRST + 63);
		public const int TVM_EDITLABELA          = ((int)TV_FIRST + 14);
		public const int TVM_EDITLABELW          = ((int)TV_FIRST + 65);
		public const int TVM_GETEDITCONTROL      = ((int)TV_FIRST + 15);
		public const int TVM_GETVISIBLECOUNT     = ((int)TV_FIRST + 16);
		public const int TVM_HITTEST             = ((int)TV_FIRST + 17);
		public const int TVM_GETITEMRECT         = ((int)TV_FIRST + 4);
		public const int TVM_GETCOUNT            = ((int)TV_FIRST + 5);
		public const int TVM_GETINDENT           = ((int)TV_FIRST + 6);
		public const int TVM_SETINDENT           = ((int)TV_FIRST + 7);
		public const int TVM_GETIMAGELIST        = ((int)TV_FIRST + 8);
		public const int TVM_SETIMAGELIST        = ((int)TV_FIRST + 9);
		public const int TVM_GETNEXTITEM         = ((int)TV_FIRST + 10);

		static TreeViewMessages()
		{
			if (Marshal.SystemDefaultCharSize == 1) 
			{
				TVM_EDITLABEL = TVM_EDITLABELA;
				TVM_SETITEM = TVM_SETITEMA;
				TVM_GETITEM = TVM_GETITEMA;
				return;
			}
			TVM_EDITLABEL = TVM_EDITLABELW;
			TVM_SETITEM = TVM_SETITEMW;
			TVM_GETITEM = TVM_GETITEMW;
		}
	}
}
